package com.epf.mybatis.dao;

import com.epf.mybatis.pojo.*;
import org.apache.ibatis.annotations.Param;

public interface OrderMapper {
    OrderUser queryOrderUserByOrderNumber(@Param("number") String number);

    /**
     * 根据订单号查询订单用户的信息
     * @param number
     * @return
     */
    OrderWithUser queryOrderWithUserByOrderNumber(@Param("number") String number);

    /**
     * 根据订单号查询订单用户的信息及订单详情
     * @param number
     * @return
     */
    OrderWithUserOrderDetail queryOrderWithUserAndDetailByOrderNumber(@Param("number") String number);

    /**
     * 根据订单号查询订单用户的信息及订单详情及订单详情对应的商品信息
     * @param number
     * @return
     */
    OrderWithUserOrderDetailItem queryOrderWithUserAndDetailItemByOrderNumber(@Param("number") String number);

    /**
     * 延迟加载
     * @param number
     * @return
     */
    OrderWithUser queryOrderAndUserByOrderNumberLazy(@Param("number") String number);
}
